package com.go.where.family.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.go.where.family.dao.MessageDao;
import com.go.where.family.dao.MsgCustomerRelationDao;
import com.go.where.family.pojo.MessageInfo;
import com.go.where.family.pojo.MsgCustomerRelation;
import com.go.where.family.service.MessageService;

@Service("messageService")
public class MessageServiceImpl implements MessageService {

	@Resource(name = "messageDao")
	private MessageDao messageDao;
	@Resource(name="msgCustomerRelationDao")
	private MsgCustomerRelationDao msgCustomerRelationDao;

	@Override
	public List<MessageInfo> queryList(Map<String, Object> map) {
		return messageDao.queryT(map);
	}

	@Override
	public MessageInfo queryMessageDetail(String messageId) {
		MessageInfo mess = new MessageInfo();
		mess.setMessageId(messageId);
		return messageDao.queryByPrimaryKey(mess);
	}

	@Override
	public int deleteMessageRelation(MsgCustomerRelation msgCustomerRelation) {
		return msgCustomerRelationDao.delete(msgCustomerRelation);
	}

	

}
